Optimal. Leaf size=192 \[ \frac {15 a^3 \tanh ^{-1}(\sin (c+d x))}{2 d}-\frac {13 a^3 \cot (c+d x)}{d}-\frac {7 a^3 \cot ^3(c+d x)}{d}-\frac {3 a^3 \cot ^5(c+d x)}{d}-\frac {4 a^3 \cot ^7(c+d x)}{7 d}-\frac {15 a^3 \csc (c+d x)}{2 d}-\frac {5 a^3 \csc ^3(c+d x)}{2 d}-\frac {3 a^3 \csc ^5(c+d x)}{2 d}-\frac {15 a^3 \csc ^7(c+d x)}{14 d}+\frac {a^3 \csc ^7(c+d x) \sec ^2(c+d x)}{2 d}+\frac {3 a^3 \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.23, antiderivative size = 192, normalized size of antiderivative = 1.00, number of steps
used = 17, number of rules used = 9, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3957, 2952,
3852, 2701, 308, 213, 2700, 276, 294} \begin {gather*} \frac {3 a^3 \tan (c+d x)}{d}-\frac {4 a^3 \cot ^7(c+d x)}{7 d}-\frac {3 a^3 \cot ^5(c+d x)}{d}-\frac {7 a^3 \cot ^3(c+d x)}{d}-\frac {13 a^3 \cot (c+d x)}{d}-\frac {15 a^3 \csc ^7(c+d x)}{14 d}-\frac {3 a^3 \csc ^5(c+d x)}{2 d}-\frac {5 a^3 \csc ^3(c+d x)}{2 d}-\frac {15 a^3 \csc (c+d x)}{2 d}+\frac {15 a^3 \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {a^3 \csc ^7(c+d x) \sec ^2(c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 276
Rule 294
Rule 308
Rule 2700
Rule 2701
Rule 2952
Rule 3852
Rule 3957
Rubi steps
\begin {align*} \int \csc ^8(c+d x) (a+a \sec (c+d x))^3 \, dx &=-\int (-a-a \cos (c+d x))^3 \csc ^8(c+d x) \sec ^3(c+d x) \, dx\\ &=\int \left (a^3 \csc ^8(c+d x)+3 a^3 \csc ^8(c+d x) \sec (c+d x)+3 a^3 \csc ^8(c+d x) \sec ^2(c+d x)+a^3 \csc ^8(c+d x) \sec ^3(c+d x)\right ) \, dx\\ &=a^3 \int \csc ^8(c+d x) \, dx+a^3 \int \csc ^8(c+d x) \sec ^3(c+d x) \, dx+\left (3 a^3\right ) \int \csc ^8(c+d x) \sec (c+d x) \, dx+\left (3 a^3\right ) \int \csc ^8(c+d x) \sec ^2(c+d x) \, dx\\ &=-\frac {a^3 \text {Subst}\left (\int \frac {x^{10}}{\left (-1+x^2\right )^2} \, dx,x,\csc (c+d x)\right )}{d}-\frac {a^3 \text {Subst}\left (\int \left (1+3 x^2+3 x^4+x^6\right ) \, dx,x,\cot (c+d x)\right )}{d}-\frac {\left (3 a^3\right ) \text {Subst}\left (\int \frac {x^8}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d}+\frac {\left (3 a^3\right ) \text {Subst}\left (\int \frac {\left (1+x^2\right )^4}{x^8} \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {a^3 \cot (c+d x)}{d}-\frac {a^3 \cot ^3(c+d x)}{d}-\frac {3 a^3 \cot ^5(c+d x)}{5 d}-\frac {a^3 \cot ^7(c+d x)}{7 d}+\frac {a^3 \csc ^7(c+d x) \sec ^2(c+d x)}{2 d}+\frac {\left (3 a^3\right ) \text {Subst}\left (\int \left (1+\frac {1}{x^8}+\frac {4}{x^6}+\frac {6}{x^4}+\frac {4}{x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}-\frac {\left (3 a^3\right ) \text {Subst}\left (\int \left (1+x^2+x^4+x^6+\frac {1}{-1+x^2}\right ) \, dx,x,\csc (c+d x)\right )}{d}-\frac {\left (9 a^3\right ) \text {Subst}\left (\int \frac {x^8}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{2 d}\\ &=-\frac {13 a^3 \cot (c+d x)}{d}-\frac {7 a^3 \cot ^3(c+d x)}{d}-\frac {3 a^3 \cot ^5(c+d x)}{d}-\frac {4 a^3 \cot ^7(c+d x)}{7 d}-\frac {3 a^3 \csc (c+d x)}{d}-\frac {a^3 \csc ^3(c+d x)}{d}-\frac {3 a^3 \csc ^5(c+d x)}{5 d}-\frac {3 a^3 \csc ^7(c+d x)}{7 d}+\frac {a^3 \csc ^7(c+d x) \sec ^2(c+d x)}{2 d}+\frac {3 a^3 \tan (c+d x)}{d}-\frac {\left (3 a^3\right ) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d}-\frac {\left (9 a^3\right ) \text {Subst}\left (\int \left (1+x^2+x^4+x^6+\frac {1}{-1+x^2}\right ) \, dx,x,\csc (c+d x)\right )}{2 d}\\ &=\frac {3 a^3 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {13 a^3 \cot (c+d x)}{d}-\frac {7 a^3 \cot ^3(c+d x)}{d}-\frac {3 a^3 \cot ^5(c+d x)}{d}-\frac {4 a^3 \cot ^7(c+d x)}{7 d}-\frac {15 a^3 \csc (c+d x)}{2 d}-\frac {5 a^3 \csc ^3(c+d x)}{2 d}-\frac {3 a^3 \csc ^5(c+d x)}{2 d}-\frac {15 a^3 \csc ^7(c+d x)}{14 d}+\frac {a^3 \csc ^7(c+d x) \sec ^2(c+d x)}{2 d}+\frac {3 a^3 \tan (c+d x)}{d}-\frac {\left (9 a^3\right ) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{2 d}\\ &=\frac {15 a^3 \tanh ^{-1}(\sin (c+d x))}{2 d}-\frac {13 a^3 \cot (c+d x)}{d}-\frac {7 a^3 \cot ^3(c+d x)}{d}-\frac {3 a^3 \cot ^5(c+d x)}{d}-\frac {4 a^3 \cot ^7(c+d x)}{7 d}-\frac {15 a^3 \csc (c+d x)}{2 d}-\frac {5 a^3 \csc ^3(c+d x)}{2 d}-\frac {3 a^3 \csc ^5(c+d x)}{2 d}-\frac {15 a^3 \csc ^7(c+d x)}{14 d}+\frac {a^3 \csc ^7(c+d x) \sec ^2(c+d x)}{2 d}+\frac {3 a^3 \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(430\) vs. \(2(192)=384\).
time = 0.81, size = 430, normalized size = 2.24 \begin {gather*} \frac {a^3 \cos (c+d x) \sec ^6\left (\frac {1}{2} (c+d x)\right ) (1+\sec (c+d x))^3 \left (-860160 \cos ^2(c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+860160 \cos ^2(c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-8 \csc (2 c) \csc ^6\left (\frac {1}{2} (c+d x)\right ) \csc (c+d x) (5264 \sin (2 c)-9580 \sin (d x)+8480 \sin (2 d x)+2776 \sin (c-d x)-6080 \sin (c+d x)+8816 \sin (2 (c+d x))-7904 \sin (3 (c+d x))+4864 \sin (4 (c+d x))-1824 \sin (5 (c+d x))+304 \sin (6 (c+d x))-9580 \sin (2 c+d x)-10024 \sin (3 c+d x)+13891 \sin (c+2 d x)+7720 \sin (2 (c+2 d x))+13891 \sin (3 c+2 d x)+10080 \sin (4 c+2 d x)-10060 \sin (c+3 d x)-12454 \sin (2 c+3 d x)-12454 \sin (4 c+3 d x)-6580 \sin (5 c+3 d x)+7664 \sin (3 c+4 d x)+7664 \sin (5 c+4 d x)+2520 \sin (6 c+4 d x)-3420 \sin (3 c+5 d x)-2874 \sin (4 c+5 d x)-2874 \sin (6 c+5 d x)-420 \sin (7 c+5 d x)+640 \sin (4 c+6 d x)+479 \sin (5 c+6 d x)+479 \sin (7 c+6 d x))\right )}{917504 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 297, normalized size = 1.55
method | result | size |
norman | \(\frac {-\frac {a^{3}}{112 d}-\frac {3 a^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{28 d}-\frac {85 a^{3} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{112 d}-\frac {15 a^{3} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+\frac {395 a^{3} \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}-\frac {57 a^{3} \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}-\frac {a^{3} \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {15 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {15 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(192\) |
risch | \(-\frac {i a^{3} \left (105 \,{\mathrm e}^{11 i \left (d x +c \right )}-630 \,{\mathrm e}^{10 i \left (d x +c \right )}+1645 \,{\mathrm e}^{9 i \left (d x +c \right )}-2520 \,{\mathrm e}^{8 i \left (d x +c \right )}+2506 \,{\mathrm e}^{7 i \left (d x +c \right )}-1316 \,{\mathrm e}^{6 i \left (d x +c \right )}-694 \,{\mathrm e}^{5 i \left (d x +c \right )}+2120 \,{\mathrm e}^{4 i \left (d x +c \right )}-2515 \,{\mathrm e}^{3 i \left (d x +c \right )}+1930 \,{\mathrm e}^{2 i \left (d x +c \right )}-855 \,{\mathrm e}^{i \left (d x +c \right )}+160\right )}{7 d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{7} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {15 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}+\frac {15 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}\) | \(215\) |
derivativedivides | \(\frac {a^{3} \left (-\frac {1}{7 \sin \left (d x +c \right )^{7} \cos \left (d x +c \right )^{2}}-\frac {9}{35 \sin \left (d x +c \right )^{5} \cos \left (d x +c \right )^{2}}-\frac {3}{5 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{2}}+\frac {3}{2 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}}-\frac {9}{2 \sin \left (d x +c \right )}+\frac {9 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 a^{3} \left (-\frac {1}{7 \sin \left (d x +c \right )^{7} \cos \left (d x +c \right )}-\frac {8}{35 \sin \left (d x +c \right )^{5} \cos \left (d x +c \right )}-\frac {16}{35 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {64}{35 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {128 \cot \left (d x +c \right )}{35}\right )+3 a^{3} \left (-\frac {1}{7 \sin \left (d x +c \right )^{7}}-\frac {1}{5 \sin \left (d x +c \right )^{5}}-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a^{3} \left (-\frac {16}{35}-\frac {\left (\csc ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\csc ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\csc ^{2}\left (d x +c \right )\right )}{35}\right ) \cot \left (d x +c \right )}{d}\) | \(297\) |
default | \(\frac {a^{3} \left (-\frac {1}{7 \sin \left (d x +c \right )^{7} \cos \left (d x +c \right )^{2}}-\frac {9}{35 \sin \left (d x +c \right )^{5} \cos \left (d x +c \right )^{2}}-\frac {3}{5 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )^{2}}+\frac {3}{2 \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}}-\frac {9}{2 \sin \left (d x +c \right )}+\frac {9 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+3 a^{3} \left (-\frac {1}{7 \sin \left (d x +c \right )^{7} \cos \left (d x +c \right )}-\frac {8}{35 \sin \left (d x +c \right )^{5} \cos \left (d x +c \right )}-\frac {16}{35 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {64}{35 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {128 \cot \left (d x +c \right )}{35}\right )+3 a^{3} \left (-\frac {1}{7 \sin \left (d x +c \right )^{7}}-\frac {1}{5 \sin \left (d x +c \right )^{5}}-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a^{3} \left (-\frac {16}{35}-\frac {\left (\csc ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\csc ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\csc ^{2}\left (d x +c \right )\right )}{35}\right ) \cot \left (d x +c \right )}{d}\) | \(297\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 268, normalized size = 1.40 \begin {gather*} -\frac {a^{3} {\left (\frac {2 \, {\left (315 \, \sin \left (d x + c\right )^{8} - 210 \, \sin \left (d x + c\right )^{6} - 42 \, \sin \left (d x + c\right )^{4} - 18 \, \sin \left (d x + c\right )^{2} - 10\right )}}{\sin \left (d x + c\right )^{9} - \sin \left (d x + c\right )^{7}} - 315 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 315 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, a^{3} {\left (\frac {2 \, {\left (105 \, \sin \left (d x + c\right )^{6} + 35 \, \sin \left (d x + c\right )^{4} + 21 \, \sin \left (d x + c\right )^{2} + 15\right )}}{\sin \left (d x + c\right )^{7}} - 105 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 105 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 12 \, a^{3} {\left (\frac {140 \, \tan \left (d x + c\right )^{6} + 70 \, \tan \left (d x + c\right )^{4} + 28 \, \tan \left (d x + c\right )^{2} + 5}{\tan \left (d x + c\right )^{7}} - 35 \, \tan \left (d x + c\right )\right )} + \frac {4 \, {\left (35 \, \tan \left (d x + c\right )^{6} + 35 \, \tan \left (d x + c\right )^{4} + 21 \, \tan \left (d x + c\right )^{2} + 5\right )} a^{3}}{\tan \left (d x + c\right )^{7}}}{140 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.58, size = 278, normalized size = 1.45 \begin {gather*} -\frac {320 \, a^{3} \cos \left (d x + c\right )^{6} - 750 \, a^{3} \cos \left (d x + c\right )^{5} + 170 \, a^{3} \cos \left (d x + c\right )^{4} + 720 \, a^{3} \cos \left (d x + c\right )^{3} - 520 \, a^{3} \cos \left (d x + c\right )^{2} + 42 \, a^{3} \cos \left (d x + c\right ) + 14 \, a^{3} - 105 \, {\left (a^{3} \cos \left (d x + c\right )^{5} - 3 \, a^{3} \cos \left (d x + c\right )^{4} + 3 \, a^{3} \cos \left (d x + c\right )^{3} - a^{3} \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) + 105 \, {\left (a^{3} \cos \left (d x + c\right )^{5} - 3 \, a^{3} \cos \left (d x + c\right )^{4} + 3 \, a^{3} \cos \left (d x + c\right )^{3} - a^{3} \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right )}{28 \, {\left (d \cos \left (d x + c\right )^{5} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{3} - d \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.56, size = 169, normalized size = 0.88 \begin {gather*} \frac {840 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 840 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - 7 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {112 \, {\left (5 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 7 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2}} - \frac {1050 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 112 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 14 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7}}}{112 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.90, size = 169, normalized size = 0.88 \begin {gather*} \frac {15\,a^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {230\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-396\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+120\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {85\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{7}+\frac {12\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{7}+\frac {a^3}{7}}{d\,\left (16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}-32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\right )}-\frac {a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________